package com.societyGames.faceExercises
{
import com.societyGames.codeExercise.CodeExercise;

public class FaceCodeExercise extends CodeExercise
{
  public var faceSimulation:FaceSimulation;

  override public function initialize():void
  {
    this.faceSimulation.initialize(this._actionQueue);
    //When the render is all empty, we want to know.
    this.addChild(this.faceSimulation.render);
  }

  //ICodeExercise-->
  protected override function evaluateWithExceptionsHandled():void
  {
    //Derived class should evaluate success
    if (this.faceSimulation.calculateIsReportCorrect())
    {
      reportSuccess();
    }
    else
    {
      reportFailure();
    }
  }

  //<--ICodeExercise
}
}